//
//  GZHomeTitleView.swift
//  sinaweibo
//
//  Created by mac book pro on 16/3/26.
//  Copyright © 2016年 finish. All rights reserved.
//

import UIKit

class GZHomeTitleView: UIButton {
    override func layoutSubviews() {
        super.layoutSubviews()
        
        // 把label移动到左边
        titleLabel?.frame.origin.x = 0
        
        // 把图片移到label的后面
        imageView?.frame.origin.x = titleLabel!.frame.width
    }
    convenience init(title: String){
        self.init()
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        sizeToFit()
    }
    

}
